#!/usr/bin/env python
# simplyGTK.py

import pygtk
pygtk.require('2.0')
import gtk

class   Simple:
    def __init__(self):
        """docstring for __init__"""
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        self.window.show()
        self.window.set_position(gtk.WIN_POS_CENTER)
        self.window.connect("delete_event",self.delete_event)
        self.button = gtk.Button("Close Me")
        self.button.connect("clicked",self.btn1Clicked,None)
        self.window.add(self.button)
        self.button.show()
    def main(self):
        """docstring for main"""
        gtk.main()
    def delete_event(self,widget, event, data=None):
        """docstring for delete_event"""
        gtk.main_quit()
        return False
    def btn1Clicked(self,wiget,data=None):
        """docstring for btn1Clicked"""
        print "Button 1 clicked"
        gtk.main_quit()

if __name__ == '__main__':
    simple = Simple()
    simple.main()
